package com.santu.edu.supporter.biz.order.kd.dao.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.santu.edu.supporter.biz.buildings.pojo.dto.BuildingsDTO;
import com.santu.edu.supporter.biz.order.kd.pojo.po.KuaidiOrderPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author npc234
 * @description 针对表【edu_supporter_order_kuaidi】的数据库操作Mapper
 * @createDate 2024-02-20 16:12:41
 * @Entity com.santu.edu.supporter.biz.order.kd.pojo.po.Kuaidi
 */
@Mapper
public interface KuaidiOrderMapper {

    /**
     * 插入一条记录
     * @param item
     */
    void insertOne(@Param("item") KuaidiOrderPO item);

    /**
     * 更新一条记录
     * @param item
     */
    void updateOne(@Param("item") KuaidiOrderPO item);


    /**
     * 获取订单信息
     * @param orderId
     * @return
     */
    KuaidiOrderPO selectById(@Param("orderId") String orderId);


    /**
     * 分页获取订单信息
     * @param schoolId
     * @param userId
     * @param orderType
     * @param objectPage
     * @return
     */
    Page<KuaidiOrderPO> selectOrderPage(@Param("schoolId") String schoolId,@Param("userId") String userId,@Param("orderType") Integer orderType, Page<KuaidiOrderPO> objectPage);

    /**
     * 更新订单状态
     * @param orderId
     * @param orderStatus
     * @param newOrderStatus
     */
    void updateOrderStatus(@Param("orderId") String orderId,@Param("orderStatus") Integer orderStatus,@Param("newOrderStatus") Integer newOrderStatus);


    /**
     * 更新订单地址
     * @param orderId
     * @param addressId
     */
    void updateOrderAddress(@Param("orderId") String orderId, @Param("addressId") String addressId);

    /**
     * 修改货物状态为已取货
     * @param orderId
     */
    void updateGoodComplete(@Param("orderId") String orderId);
}




